package io.github.ali.commons.lock;

import io.github.ali.commons.lock.annotation.EnableLock;
import io.github.ali.commons.lock.impl.NativeLocker;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @author ALi
 * @version 1.0
 * @date 2023-02-06 14:38
 * @description
 */
@EnableAspectJAutoProxy
@EnableLock
@Configuration
public class LockerConfig {
    @Bean
    public LockService lockService(){
        return new LockService();
    }
    @Bean
    public LockerFactory lockerFactory(){
        return () -> new NativeLocker();
    }
}
